package com.sangeng.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import java.io.Serializable;
import java.util.Date;

/**
 * 评论表(Comment)实体类
 *
 * @author mg
 * @since 2022-05-05 11:18:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sg_comment")
@JsonIgnoreProperties(value = "hibernateLazyInitializer")
public class Comment implements Serializable{
    private static final long serialVersionUID= -31667782589729021L;
    @Id
    private Long id;
    /** 评论类型（0代表文章评论，1代表友链评论）*/
    private String type;
    /** 文章id*/
    private Long articleId;
    /** 根评论id*/
    private Long rootId;
    /** 评论内容*/
    private String content;
    /** 所回复的目标评论的userid*/
    private Long toCommentUserId;
    /** 回复目标评论id*/
    private Long toCommentId;
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    /** 删除标志（0代表未删除，1代表已删除）*/
    private Integer delFlag;
}

